package io;

import java.io.*;

/**
 * 自行组建流链接,使用PrintWriter按行写出字符串
 */
public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
        FileOutputStream fos=new FileOutputStream("pw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos,"UTF-8");
        BufferedWriter bw=new BufferedWriter(osw);
        PrintWriter pw=new PrintWriter(bw);

        pw.println("第三方哈嘎就是打开");
        pw.println("空间按时发噶AKJJFFJG的撒");
        System.out.println("写出完毕");
        pw.close();
    }
}
